/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { BCar } from './B.js';
import { CStar } from './C.js';
import { a, func, b } from './A.js';
import {
  export0,
  export1,
  export2,
  export3,
  export4,
  export5,
  export6,
  export7,
  export8,
  export9,
  export10,
  export11,
  export12,
  export13,
  export14,
  export15,
  export16,
  export17,
  export18,
  export19,
  export20,
  export21,
  export22,
  export23,
  export24,
  export25,
  export26,
  export27,
  export28,
  export29,
  export30,
  export31,
  export32,
  export33,
  export34,
  export35,
  export36,
  export37,
  export38,
  export39,
  export40,
  export41,
  export42,
  export43,
  export44,
  export45,
  export46,
  export47,
  export48,
  export49,
  export50,
  export51,
  export52,
  export53,
  export54,
  export55,
  export56,
  export57,
  export58,
  export59,
  export60,
  export61,
  export62,
  export63,
  export64,
  export65,
  export66,
  export67,
  export68,
  export69,
  export70,
  export71,
  export72,
  export73,
  export74,
  export75,
  export76,
  export77,
  export78,
  export79,
  export80,
  export81,
  export82,
  export83,
  export84,
  export85,
  export86,
  export87,
  export88,
  export89,
  export90,
  export91,
  export92,
  export93,
  export94,
  export95,
  export96,
  export97,
  export98,
  export99,
  export100,
  export101,
  export102,
  export103,
  export104,
  export105,
  export106,
  export107,
  export108,
  export109,
  export110,
  export111,
  export112,
  export113,
  export114,
  export115,
  export116,
  export117,
  export118,
  export119,
  export120,
  export121,
  export122,
  export123,
  export124,
  export125,
  export126,
  export127,
  export128,
  export129,
  export130,
  export131,
  export132,
  export133,
  export134,
  export135,
  export136,
  export137,
  export138,
  export139,
  export140,
  export141,
  export142,
  export143,
  export144,
  export145,
  export146,
  export147,
  export148,
  export149,
  export150,
  export151,
  export152,
  export153,
  export154,
  export155,
  export156,
  export157,
  export158,
  export159,
  export160,
  export161,
  export162,
  export163,
  export164,
  export165,
  export166,
  export167,
  export168,
  export169,
  export170,
  export171,
  export172,
  export173,
  export174,
  export175,
  export176,
  export177,
  export178,
  export179,
  export180,
  export181,
  export182,
  export183,
  export184,
  export185,
  export186,
  export187,
  export188,
  export189,
  export190,
  export191,
  export192,
  export193,
  export194,
  export195,
  export196,
  export197,
  export198,
  export199,
  export200,
  export201,
  export202,
  export203,
  export204,
  export205,
  export206,
  export207,
  export208,
  export209,
  export210,
  export211,
  export212,
  export213,
  export214,
  export215,
  export216,
  export217,
  export218,
  export219,
  export220,
  export221,
  export222,
  export223,
  export224,
  export225,
  export226,
  export227,
  export228,
  export229,
  export230,
  export231,
  export232,
  export233,
  export234,
  export235,
  export236,
  export237,
  export238,
  export239,
  export240,
  export241,
  export242,
  export243,
  export244,
  export245,
  export246,
  export247,
  export248,
  export249,
  export250,
  export251,
  export252,
  export253,
  export254,
  export255,
  export256,
  export257,
  export258,
  export259,
  export260,
  export261,
  export262,
  export263,
  export264,
  export265,
  export266,
  export267,
  export268,
  export269,
  export270,
  export271,
  export272,
  export273,
  export274,
  export275,
  export276,
  export277,
  export278,
  export279,
  export280,
  export281,
  export282,
  export283,
  export284,
  export285,
  export286,
  export287,
  export288,
  export289,
  export290,
  export291,
  export292,
  export293,
  export294,
  export295,
  export296,
  export297,
  export298,
  export299 } from './D.js';
let val = 0;
function T() {
  var myCar = { name: "myCar", type: "test", price: "100" }
  var carInfo = BCar.carInfo.apply(myCar);
  var star = { name: "star", type: "star_Test", color: "Y" }
  var starColor = CStar.starColor.apply(star);
  if (carInfo != "myCar:test:100" ) {
      print("Fail");
  } else if (starColor != "star:star_Test:Y") {
      print("Fail");
  }

  class Test {
      constructor(a) {
          this.a = a
      }
  }

  var test = new Test(a)
  func();
  val = test.a + b;
  val = val + export299;
}

for (let i = 0; i < 10; i++) {
  T();
}

ArkTools.jitCompileAsync(T);
let res = ArkTools.waitJitCompileFinish(T);
print(res)
T();
print(val)
